package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzEquipmentChannelMapper;
import com.ruoyi.business.domain.CzEquipmentChannel;
import com.ruoyi.business.service.ICzEquipmentChannelService;

/**
 * 设备视频通道Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-10
 */
@Service
public class CzEquipmentChannelServiceImpl implements ICzEquipmentChannelService 
{
    @Autowired
    private CzEquipmentChannelMapper czEquipmentChannelMapper;

    /**
     * 查询设备视频通道
     * 
     * @param id 设备视频通道主键
     * @return 设备视频通道
     */
    @Override
    public CzEquipmentChannel selectCzEquipmentChannelById(String id)
    {
        return czEquipmentChannelMapper.selectCzEquipmentChannelById(id);
    }

    /**
     * 查询设备视频通道列表
     * 
     * @param czEquipmentChannel 设备视频通道
     * @return 设备视频通道
     */
    @Override
    public List<CzEquipmentChannel> selectCzEquipmentChannelList(CzEquipmentChannel czEquipmentChannel)
    {
        return czEquipmentChannelMapper.selectCzEquipmentChannelList(czEquipmentChannel);
    }

    /**
     * 新增设备视频通道
     * 
     * @param czEquipmentChannel 设备视频通道
     * @return 结果
     */
    @Override
    public int insertCzEquipmentChannel(CzEquipmentChannel czEquipmentChannel)
    {
        czEquipmentChannel.setCreateTime(DateUtils.getNowDate());
        return czEquipmentChannelMapper.insertCzEquipmentChannel(czEquipmentChannel);
    }

    /**
     * 修改设备视频通道
     * 
     * @param czEquipmentChannel 设备视频通道
     * @return 结果
     */
    @Override
    public int updateCzEquipmentChannel(CzEquipmentChannel czEquipmentChannel)
    {
        czEquipmentChannel.setUpdateTime(DateUtils.getNowDate());
        return czEquipmentChannelMapper.updateCzEquipmentChannel(czEquipmentChannel);
    }

    /**
     * 批量删除设备视频通道
     * 
     * @param ids 需要删除的设备视频通道主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentChannelByIds(String[] ids)
    {
        return czEquipmentChannelMapper.deleteCzEquipmentChannelByIds(ids);
    }

    /**
     * 删除设备视频通道信息
     * 
     * @param id 设备视频通道主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentChannelById(String id)
    {
        return czEquipmentChannelMapper.deleteCzEquipmentChannelById(id);
    }
}
